const express = require('express')
const app = express()
app.listen(8081)
const {createProxyMiddleware} = require
('http-proxy-middleware')

const handlerProxy = createProxyMiddleware({
    target: 'http://localhost:8080',
    changeOrigin: true
})

app.use(express.static('static'))
app.use(express.static('public'))

app.use('/node_modules', express.static('node_modules'))

app.use('/', (req, res) => {
    handlerProxy(req, res)
})